package com.lagou.service.impl;

import com.lagou.dao.EmployeeDao;
import com.lagou.domain.Employee;
import com.lagou.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeDao employeeDao;

    /**
     * 查询列表
     * @return
     */
    @Override
    public List<Employee> findAll() {
        return employeeDao.findAll();
    }

    /**
     * 保存
     * @param employee
     */
    @Override
    public void save(Employee employee) {
        employeeDao.save(employee);
    }
}
